﻿/*
 * File: NvshuControl.cs
 * Project: NvshuScrpits
 * File Created: Monday, 24th December 2018 3:35:49 pm
 * Author: shpkng (shpkng@gmail.com)
 * Organization: Communication University of China
 * License: GPL
 * -----
 * Last Modified: Sunday, 30th December 2018 3:23:19 am
 * Modified By: shpkng (shpkng@gmail.com)
 * -----
 * Valar Morghulis.
 */

//用来控制女书演示场景中的手势和字符行为

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Experimental.VFX;

public class NvshuControl : MonoBehaviour {
    [SerializeField] private Transform cursor;

    private NvshuWord current = null;
	private bool isReadingDetail = false; //是否正在阅读详情

    [SerializeField] public VisualEffect vfx;
    void Start () {
		
    }

    void Update () {

        if (Input.GetMouseButton (0)) {
            NvshuWord s;
            Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);
            RaycastHit hit;
            if (Physics.Raycast (ray, out hit, 30)) {
                s = hit.collider.GetComponent<NvshuWord> ();
                if (s != null) {
                    s.Use ();
                }
            }
        }

    }
}